<template>
  <!--购买服务 杨灿-->
  <el-row>
    <el-col :span="22" offset="1">
      <el-table
        :data="tableData"
        style="width: 100%"
        >
        <el-table-column

          label="图片"
          width="200"
        >
          <el-image
            style="width: 100px; height: 100px"
            :src="url"
            :fit="fit"></el-image>
        </el-table-column>
        <el-table-column
          prop="name"
          label="服务名称"
          width="150">
        </el-table-column>

        <el-table-column
          prop="address"
          label="服务详情"
          width="350">
        </el-table-column>

        <el-table-column
          fixed="right"
          label="操作"
          width="120">
          <template slot-scope="scope">
            <el-button
              @click.native.prevent="deleteRow(scope.$index, tableData)"
              type="text"
              size="small">
              立即购买
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-col>
  </el-row>

</template>

<script>
    export default {
        name: "PurchaseServices",
      methods: {
        deleteRow(index, rows) {
          rows.splice(index, 1);
        }
      },
      data() {
        return {
          fits: ['fill', 'contain', 'cover', 'none', 'scale-down'],
          url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
          tableData: [{
            date: '2016-05-03',
            name: '购买门店',
            province: '上海',
            city: '普陀区',
            address: '上海市普陀区金沙江路 1518 弄',
            zip: 200333
          }, {
            date: '2016-05-02',
            name: '门店续费',
            province: '上海',
            city: '普陀区',
            address: '上海市普陀区金沙江路 1518 弄',
            zip: 200333
          }, {
            date: '2016-05-04',
            name: '资料费用',
            province: '上海',
            city: '普陀区',
            address: '上海市普陀区金沙江路 1518 弄',
            zip: 200333
          }, {
            date: '2016-05-01',
            name: '王小虎',
            province: '上海',
            city: '普陀区',
            address: '上海市普陀区金沙江路 1518 弄',
            zip: 200333
          }]
        }
      }
    }
</script>

<style scoped>

</style>
